<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model backend\models\SetMealOrderSearch */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="set-meal-order-search search-wrap">
    <?php $form = ActiveForm::begin([
        'action' => ['index'],
        'method' => 'get',
        'options' => ['class' => 'form-inline'],
        'fieldConfig' => [
            'options' => ['class' => 'form-group'],
            'template' => "{input}"
        ],
    ]); ?>

    <?= $form->field($model, 'sn') ->textInput(['placeholder'=>'请输入订单编号'])?>

<!--    --><?php //echo $form->field($model, 'member_id')->widget(\kartik\select2\Select2::class, [
//        'data'          => \yii\helpers\ArrayHelper::map(\common\models\User::find()->where(['status' => 10])->asArray()->all(), 'id', 'username'),
//        'options'       => ['placeholder' => '请选择下单用户'],
//        'pluginOptions' => [
//            'allowClear' => true,
//            'width'      => '230px',
//        ],
//    ]); ?>

    <?= $form->field($model, 'name') ->textInput(['placeholder'=>'请输入姓名'])?>

    <?= $form->field($model, 'phone') ->textInput(['placeholder'=>'请输入联系方式'])?>

    <?= $form->field($model, 'status') ->dropDownList(\common\models\SetMealOrder::$statusMap, ["prompt" => "请选择订单状态"])?>

    <?= $form->field($model, 'is_use') ->dropDownList(\common\models\SetMealOrder::$isUseMap, ["prompt" => "请选择使用状态"])?>


    <?= $form->field($model, 'set_meal_id')->widget(\kartik\select2\Select2::class, [
        'data'          => \yii\helpers\ArrayHelper::map(\common\models\SetMeal::find()->asArray()->all(), 'id', 'title'),
        'options'       => ['placeholder' => '请选择下单套餐'],
        'pluginOptions' => [
            'allowClear' => true,
            'width'      => '230px',
        ],
    ]); ?>

    <div class="form-group">
        <?= Html::submitButton('搜索', ['class' => 'btn btn-primary']) ?>
        <?= Html::resetButton('重置', ['class' => 'btn btn-default']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
<hr />
